#ifndef _EMB_STDLIB_MAILBOX_H_
#define _EMB_STDLIB_MAILBOX_H_

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>

#include "EmbStdLib_Type.h"

#define LC_COMMUNICATION_MAILBOX_MAX 10 // Mailbox maximum capacity

// Define message structure
typedef struct
{
  uint32 message_id;
  void *message_ptr;
  uint32 message_param0;
  uint32 message_param1;
  uint32 message_param2;
  uint32 message_command;
  uint8 *message_payload;
  uint32 message_payload_length;
} mailbox_message_t;

// Spinlock implementation
typedef struct
{
  volatile uint32 lock;
} spinlock_t;

#endif // _EMB_STDLIB_MAILBOX_H_
